home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_324 / dpfft / readme2 < prev    next >
Text File  |  1992-05-06  |  5KB  |  138 lines

  1.  
  2. This code is an extension of the program on FISH-disk 290 and is
  3. considered as freeware in the usual sense.
  4. For its general usage see the file readme1.
  5. The following has been added:
  6.  
  7.     - A Fast Fourier Transform (FFT)
  8.     - Display of a (customized) amplitude and phase-spectrum
  9.     - A socalled prewhitening capability of the data
  10.     - A Welch window for spectral smoothing
  11.  
  12. A Leftklick on FFT in the plotwindow (if you cannot find he requester
  13. double-klick with right) brings up the FFT requester. Not yet implemented
  14. are:
  15.     - A 3-D plot of (running) spectra
  16.     - A real transform by means of the autocorrelation-function
  17.     - Log-log plots and normalized spectra
  18.     - The complex plane
  19.  
  20. If you find gadgets with no function at all, this will be the reason.
  21.  
  22. The general idea of the program is to read in arbitrary experimental
  23. data, visualize them and crry out a Fouriertransform of an interesting
  24. detail. The start of the transform is determined by the first datum in
  25. the plotwindow.
  26.  
  27. The defaultvalue of 7 in the FFT requester means that 2^7 points will be
  28. used for the transform. The reason behind the power of two is simply
  29. velocity. Clicking on OK ,using default, yields 2^(7-1)=128 harmonics.
  30. With redundancy you can skip a variable number of points for the
  31. transform in case of a long record. Typing in 1 means that every third
  32. point is taken into account for the transformation.
  33.  
  34. The appearing window shows in the upper half the amplitudes and
  35. below you see the appropriate phases.
  36. A double-klick with the right mousebutton brings up the requester.
  37. The arrows manipulate the Amplitudes of the Harmonics. OK brings you
  38. back into the main window and with NOK into the plotwindow. With PRT
  39. a little requester is fired up where RDC means a reduction of the
  40. printed picture (can be useful for 9 needles). The crosshair for the
  41. amplitudes (leftklick) can only be activated without the requester.
  42. IDCMP input of Intuition is blocked in case of a request. To that
  43. purpose the CRH gadget is activated which lets the requester
  44. dissappear. The other gadget has not been implemented yet
  45.  
  46.     ---------------------------------------------------------------
  47.  
  48. EXAMPLE
  49. -------
  50.  
  51. To see the full power of a fouriertransform as far as periodic signals
  52. is concerned (the interpretation is more involved for random signals),
  53. the following step by step procedure may be useful (for the usage of the
  54. program as well):
  55.  
  56. 1.
  57.  
  58. If you are on the workbench, double-klick with left on the dpfft icon.
  59. (If you are in CLI, type <dpfft> and return). It is possibly simplest to
  60. boot with the FISH-disk itself so you can use the default values of dpfft.
  61.  
  62. 2.
  63.  
  64. Activate with the right mousebutton the ASCII-file option in the menu
  65.  
  66. 3.
  67.  
  68. Search for and Klick on signals(dir) and after that on "eeg"
  69.  
  70. 4.
  71.  
  72. Read in, say, 1500 data (leftklick on the 'Number of data:' stringadget
  73. and type in 1500)
  74.  
  75. 6.
  76.  
  77. Left-klick with the mousebutton on OK and choose the 'plot' option in
  78. the menu
  79.  
  80. 7.
  81.  
  82. Double-klick the right mousebutton to fire up the requester for the options
  83. Center the data with the second gadget from the left. Observing the signal
  84. (expand it horizontally, for instance, by means of a leftklick on OK and
  85. using the small triangles in the titlebar) shows that it is not possible
  86. to detect hidden periodicities in the signal
  87.  
  88. 8.
  89.  
  90. Let the requester reappear by means of a double-klick with the right
  91. mousebutton and activate  FFT
  92.  
  93. 9.
  94.  
  95. Since we read in 1500 data, the maximum N can be used which is 10.
  96. (The program works with max 2^10=1024 points since the windowresolution
  97. amounts to 640 sothat 512 harmonics can be displayed maximally, if we want
  98. to retain a pixel to pixel resolution). Klick on the stringadget and
  99. type in 10.
  100.  
  101. 10.
  102.  
  103. With no window or prewhitening (=first difference filter), which are
  104. the WND and FLT gadgets, a direct transform is carried out by activating
  105. OK. This takes a few seconds. A transform with N<10 will be faster.
  106.  
  107. 11.
  108.  
  109. Double-klick with the right mousebutton for the requester. Use the
  110. arrow which is pointing downwards for reducing the amplitudes of the
  111. harmonics. Do this until all the harmonics are displayed. A pronounced
  112. peak should appear at right.
  113.  
  114. 12.
  115.  
  116. Let the requester dissappear by means of CRH and klick once on the
  117. left mousebutton in the harmonics area. A crosshair appears. Go to
  118. this peak and note the number of the harmonic (which should be 206).
  119.  
  120.  
  121.  
  122. DISCUSSION
  123. ----------
  124.  
  125. The pronounced peaks are the hidden periodicities in the signal.
  126. Remember that the recordlength of 1024 points with a 4 ms sampling period
  127. totals to ca 4 seconds. The question is as to whether the peak at right
  128. belongs to the signalsource itself or not. Placing the crosshair on that
  129. particular harmonic shows that it carries the number 206. It is now clear
  130. where it comes from, since 204/(4 seconds) represents the frequency of
  131. the linevoltage (50 Hz in Europe). The other peaks can be identified
  132. with the socalled alpha and beta waves of an electroencephalogram.
  133.  
  134.     ------------------------------------------------------------------
  135.  
  136.  
  137.  
  138.